import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    component: resolve => require(['../components/page/Login.vue'], resolve),
  },
  {
    path: '/index',
    component: resolve => require(['../components/common/Index.vue'], resolve),
    children: [{
        path: '',
        redirect: 'runInfo'
      },
      {
        path: 'runInfo',
        component: resolve => require(['../components/page/RunInfo.vue'], resolve),
      },
      {
        path: 'car/list',
        component: resolve => require(['../components/page/ParkLock.vue'], resolve), // 车位列表
      },
      {
        path: 'area/list',
        component: resolve => require(['../components/page/Area.vue'], resolve), // 区域列表
      },
      {
        path: 'parkfield/list',
        component: resolve => require(['../components/page/Parkfield.vue'], resolve), // 停车场列表
      },
      {
        path: 'charger/list',
        component: resolve => require(['../components/page/Charger.vue'], resolve), // 充电桩列表
      },
      {
        path: 'ebCharger/list',
        component: resolve => require(['../components/page/EBCharger.vue'], resolve), // 电瓶车列表
      },
      {
        path: 'manager/list',
        component: resolve => require(['../components/page/Manager.vue'], resolve), // 合伙人列表
      },
      {
        path: 'invoicetitle/list',
        component: resolve => require(['../components/page/Invoicetitle.vue'], resolve), // 发票抬头
      },
      {
        path: 'invoiceproc/list',
        component: resolve => require(['../components/page/Invoiceproc.vue'], resolve), // 发票申请
      },
      {
        path: 'copartner/list',
        component: resolve => require(['../components/page/Copartner.vue'], resolve), // 合伙人列表
      },
      {
        path: 'oppark/list',
        component: resolve => require(['../components/page/Oppark.vue'], resolve), // 运营停车场
      },
      {
        path: 'lcredepositrequest/list',
        component: resolve => require(['../components/page/lcredepositrequest.vue'], resolve), // 退款申请
      },
      {
        path: 'feedback/list',
        component: resolve => require(['../components/page/Feedback.vue'], resolve), // 用户留言
      },
      {
        path: 'lcqa/list',
        component: resolve => require(['../components/page/lcqa.vue'], resolve), //运维管理
      },
      {
        path: '/index/lcblacklist/list',
        component: resolve => require(['../components/page/BlackList.vue'], resolve), //黑名单管理
      },
      {
        path: '/index/ebDeposit/list',
        component: resolve => require(['../components/page/EBDeposit.vue'], resolve), //电瓶车服务
      },
      {
        path: '/index/abnormalOrder/list',
        component: resolve => require(['../components/page/abnormalOrder.vue'], resolve), //异常订单
      },
      {
        path: '/index/abnormalAmount/list',
        component: resolve => require(['../components/page/abnormalAmount.vue'], resolve), //处理金额
      },
      {
        path: '/index/checkBook/list',
        component: resolve => require(['../components/page/checkBook.vue'], resolve), //处理金额
      },
      {
        path: '/index/oplog/list',
        component: resolve => require(['../components/page/oplog.vue'], resolve), //处理金额
      },
      {
        path: '/index/processedOrder/list',
        component: resolve => require(['../components/page/processedOrder.vue'], resolve), //处理结果
      },
      {
        path: '/index/processedOrder/list',
        component: resolve => require(['../components/page/processedOrder.vue'], resolve), //处理结果
      },
      {
        path: '/index/mp/lockManager',
        component: resolve => require(['../components/page/lockManager.vue'], resolve),
      },
      {
        path: '/index/checkAmount/list',
        component: resolve => require(['../components/page/checkAmount.vue'], resolve),
      },
      {
        path: '/index/deviceError/list',
        component: resolve => require(['../components/page/deviceError.vue'], resolve),
      },
      {
        path: '/index/deviceRepair/list',
        component: resolve => require(['../components/page/deviceRepair.vue'], resolve),
      },
      {
        path: '/index/refundOcc/list',
        component: resolve => require(['../components/page/refundOcc.vue'], resolve),
      },
      {
        path: '/index/inspectRecord/list',
        component: resolve => require(['../components/page/inspectRecord.vue'], resolve),
      },
      {
        path: '/index/lcinspectsign/list',
        component: resolve => require(['../components/page/refundOcc.vue'], resolve),
      },
      {
        path: '/index/phone400Record/list',
        component: resolve => require(['../components/page/phone400Record.vue'], resolve),
      }
    ]
  },
  {
    path: '*',
    component: resolve => require(['../components/page/404.vue'], resolve),
  }
]

export default new VueRouter({
  routes // （缩写）相当于 routes: routes
})
